preferredColorScheme

Sets the preferred system appearance (light or dark) for the view hierarchy. Only affects non-transient system overlays.

Type

preferredColorScheme?: "light" | "dark"

Example

<NavigationStack>
  <List preferredColorScheme="dark">
    <Text>Dark mode view</Text>
  </List>
</NavigationStack>